//
//  ActorTableViewCell.m
//  艾听歌
//
//  Created by dllo on 16/5/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PrefectureTableViewCell.h"

@implementation PrefectureTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.PreImage = [[UIImageView alloc] init];
//        self.PreImage.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.PreImage];
        
        self.PreLabel = [[UILabel alloc] init];
//        self.PreLabel.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:self.PreLabel];
        
        self.introLabel = [[UILabel alloc] init];
//        self.introLabel.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:self.introLabel];
        
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.PreImage.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 255, 65);
    self.PreLabel.frame = CGRectMake(self.contentView.frame.size.width - 225, self.PreImage.frame.origin.y, WIDTH - 230 , 30);
    self.introLabel.frame = CGRectMake(self.PreLabel.frame.origin.x, self.PreLabel.frame.origin.y + 25, WIDTH - 175, 30);
    
}



- (void)setNewMusicModel:(MusicSmallModel *)NewMusicModel
{
    _NewMusicModel = NewMusicModel;
    
    self.PreLabel.text = _NewMusicModel.name;
    self.introLabel.text = _NewMusicModel.desc;
    self.introLabel.font = [UIFont systemFontOfSize:14];
    [self.PreImage sd_setImageWithURL:[NSURL URLWithString:_NewMusicModel.picUrl] placeholderImage:[UIImage imageNamed:@"hold.png"]];
    
}










@end
